//app.js
import store from '/store/index.js'
App({
  list:[],
  onLaunch: function () {
  },
  onShow(){
    const num = store.getState().cartlist.cartlist.reduce((result, item) => {
      result = result + item.count
      return result
    }, 0)
    wx.setTabBarBadge({
      index: 2,
      text: `${num}`
    })
  },
  globalData: {
    userInfo: null
  }
})